Skip to content

Conversation

aBurmeseDev
Copy link
Contributor

@aBurmeseDev aBurmeseDev commented Mar 4, 2025

Description of changes:

  • Replace empty deprecation messages with "see description"
  • Check for deprecatedTrait message and render it properly

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aBurmeseDev aBurmeseDev marked this pull request as ready for review March 4, 2025 07:04
@aBurmeseDev aBurmeseDev requested a review from a team as a code owner March 4, 2025 07:04
@@ -225,9 +225,9 @@ boolean writeShapeDocs(Shape shape, UnaryOperator<String> preprocessor) {
if (shape.getTrait(DeprecatedTrait.class).isPresent()) {
DeprecatedTrait deprecatedTrait = shape.expectTrait(DeprecatedTrait.class);
String deprecationMessage = deprecatedTrait.getMessage()
.map(msg -> " " + msg)
.orElse("");
String deprecationString = "@deprecated" + deprecationMessage;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String deprecationMessage = deprecatedTrait.getMessage()
    .orElse("see description.");

String deprecationAnnotation = "@deprecated " + deprecationMessage;

docs = docs + "\n\n" + deprecationAnnotation;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants